using System;
using System.Collections.Generic;


namespace OA.Model
{

    /// <summary>
    /// 权限
    /// </summary>
    public class Authority : Base
    {
        /// <summary>
        /// ID
        /// </summary>
        public virtual int ID { get; set; }

        /// <summary>
        /// 类型,1:用户,2:角色
        /// </summary>
        public virtual Common.EnumType.RoleUserType UserType { get; set; }

        /// <summary>
        /// 用户账号或角色编号
        /// </summary>
        public virtual string RoleUserCode { get; set; }

        /// <summary>
        /// 用户
        /// </summary>
        public virtual Manager Manager { get; set; }

        /// <summary>
        /// 角色
        /// </summary>
        public virtual ManagerRole Role { get; set; }

        /// <summary>
        /// 资源类型
        /// </summary>
        public virtual Common.EnumType.ResourceType ResourceType { get; set; }

        /// <summary>
        /// 站点编号
        /// </summary>
        public virtual string WebSiteCode { get; set; }

        /// <summary>
        /// 站点
        /// </summary>
        public virtual WebSite WebSite { get; set; }

        /// <summary>
        /// 资源编号
        /// </summary>
        public virtual string MenuCode { get; set; }

        /// <summary>
        /// 菜单
        /// </summary>
        public virtual Menu Menu { get; set; }
        /// <summary>
        /// 按钮编号
        /// </summary>
        public virtual string ButtonCode { get; set; }

        /// <summary>
        /// 按钮
        /// </summary>
        public virtual Button Button { get; set; }

        /// <summary>
        /// 是否允许
        /// </summary>
        public virtual bool IsAllow { get; set; }

        /// <summary>
        /// 是否拒绝
        /// </summary>
        public virtual bool IsDeny { get; set; }

        /// <summary>
        /// 允许授权(允许其将此权限分配给其它用户)
        /// </summary>
        public virtual bool IsDelegate { get; set; }

    }
}